package cn.school.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.ExamResultDao;
import cn.school.dao.StudentDao;
import cn.school.util.MyBatisUtil;
import cn.shcool.entity.ExamResult;
import cn.shcool.entity.Student;

public class ResultTest2 {

	public static void main(String[] args) {

		SqlSession s = MyBatisUtil.get();

		ExamResultDao sdao = s.getMapper(ExamResultDao.class);
		ExamResult r = sdao.get(3L);
		if (r != null) {
			System.out.println(r);
			System.out.println("学生信息：" + r.getStudent());
		}
//		List<ExamResult> list = sdao.findALL();
//		for (ExamResult r : list) {
//			System.out.println(r);
//			System.out.println("学生信息：" + r.getStudent());
//		}
		MyBatisUtil.close(s);

	}

}
